<layout name="layout" />
<!---->
<div class="user_main">
    <!------------------------------------------------------------------------------------------------------------------------->
    <div class="content_box">
        <p class="user_main_title">发布的信息</p>
        <table class="list favorites">
            <tr>
                <th class="tit">标题</th>
                <th class="link">网址</th>
                <th class="edit">操作</th>
                <th class="select">
                    <input type="checkbox" value="0"  onclick="checkAll(this)"/>
                    <span>全选</span>
                </th>
            </tr>
            <volist name="data.list" id="vo" mod="2">
                <tr <eq name="mod" value="1">class="odd"</eq> overstyle="on" id="fav_{$vo.fav_id}">
                <td class="tit">{$vo.title}</td>
                <td class="link">
                    <a href="{$vo.url}" target="_blank">{$vo.url}</a>
                </td>
                <td class="edit">
                    <a href="javascript:delFav({$vo.fav_id});">删除</a>
                </td>
                <td class="select">
                    <input type="checkbox" name="checkbox" value="{$vo.fav_id}" onclick="checkon(this)"/>
                </td>
                </tr>
            </volist>
        </table>
        <div class="paginationa">{$data.page}</div>
        <p class="favorites"><button class="button" onclick="delFav();">删除</button></p>
    </div>
    <!------------------------------------------------------------------------------------------------------------------------->
</div>
<script type="text/javascript">
    $(document).ready(function(){
        $("tr[overstyle='on']").hover(
        function () {
            $(this).addClass("bg_hover");
        },
        function () {
            $(this).removeClass("bg_hover");
        }
    );
    });
    
    function checkon(o){
        if( o.checked == true ){
            $(o).parents('tr').addClass('bg_on') ;
        }else{
            $(o).parents('tr').removeClass('bg_on') ;
            $(o).parents('tr').removeClass('bg_hover') ;
        }
    }
    
    function unCheckAll(o){
        $('input[name="checkbox"]').removeAttr('checked');
        $('tr[overstyle="on"]').removeClass("bg_on");
    }
    
    function checkAll(o){
		if( o.checked == true ){
			$('input[name="checkbox"]').attr('checked','true');
			$('tr[overstyle="on"]').addClass("bg_on");
		}else{
			$('input[name="checkbox"]').removeAttr('checked');
			$('tr[overstyle="on"]').removeClass("bg_on");
		}
	}
    
    //获取已选择用户的ID数组
    function getChecked() {
        var ids = new Array();
        $.each($('table input:checked'), function(i, n){
            if($(n).val() > 0)
                ids.push( $(n).val() );
        });
        return ids;
    }
</script>
<!---->   
</div>
<!----> 
<div class="common_right">
    <div class="Cad">{:getBlock('common_right_ad1')}</div>
    <div class="Cad martop10">{:getBlock('common_right_ad2')}</div>
    <div class="CR_title"><i><a href="{:U('Home/Search/index')}">更多&gt;&gt;</a></i><strong>推荐信息</strong></div>   
    <ul class="Recommend_information">
        <volist name="rounddz" id="rdz">
            <li>
                <div class="img"><img src="{$rdz.img_url}"></div>
                <dl>
                    <dt><a href="{:U('Home/Dazhe/show', array('id'=>$rdz['dazhe_id']))}">{$rdz.title}</a></dt>
                    <dd class="s">{$rdz.user_id|getUserName}</dd>
                    <dd>时间：{$rdz.create_time|date="Y-m-d", ###}</dd>
                </dl>
            </li>     
        </volist>   
    </ul>
</div>
<!---->
<div class="clear"></div>
</div>
